def userInput():
    str = input('请输入省份和要查找的项目(使用空格分隔):')
    return str.split(" ")

def readFile():
    with open("C://Users/admin/Desktop/xiaofei.csv","r") as f:
        ls = []
        for line in f:
            line = line.replace("\n","")
            l = line.split(",")
            ls.append(l)
        return ls
userList = userInput()
fileList = readFile()
list = []
for i in userList:
    for j in range(len(fileList)):
        for k in range(len(fileList[0])):
            if i == fileList[j][k]:
                if k == 0:
                    list.append(j)
                if j == 0:
                    list.append(k)
print(list)
print("你输入的超市是:{}".format(userList[0]))
for i in range(1,len(list)):
    print("{}的消费金额为:{}".format(userList[i],fileList[list[0]][list[i]]))
